package de.projectgoodmorning.alarm.storage;

import android.test.AndroidTestCase;

public class IdCounterTest extends AndroidTestCase {

	private IdCounter counter;
	
	protected void setUp() throws Exception {
		super.setUp();
	
		counter = new IdCounter( getContext() );
	}

	public void test_it_should_start_with_zero() {
		counter.reset();
		int id = counter.latestID();
		assertEquals( 0, id );
	}
	
	public void test_it_should_increment_counter() {
		int latest = counter.latestID();
		assertEquals( latest+1, counter.nextID() );
	}
}
